<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.17"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Win32k: mdimenu.c 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Win32k
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.17 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('a00197.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">函数</a>  </div>
  <div class="headertitle">
<div class="title">mdimenu.c 文件参考</div>  </div>
</div><!--header-->
<div class="contents">

<p><a href="a00197_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
函数</h2></td></tr>
<tr class="memitem:a779ab41018bd3951528a4201d4b5a0fb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a779ab41018bd3951528a4201d4b5a0fb">FindPwndChild</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndMDI, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wChildID)</td></tr>
<tr class="separator:a779ab41018bd3951528a4201d4b5a0fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afc61df735e5335ec687432fc26b774a2"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#afc61df735e5335ec687432fc26b774a2">MakeMenuItem</a> (LPWSTR lpOut, <a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd)</td></tr>
<tr class="separator:afc61df735e5335ec687432fc26b774a2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a953c4e7b37f089bee9b2e339c2df42ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a953c4e7b37f089bee9b2e339c2df42ef">ModifyMenuItem</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd)</td></tr>
<tr class="separator:a953c4e7b37f089bee9b2e339c2df42ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4d32131a965be194567156981da95b09"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a4d32131a965be194567156981da95b09">MDIAddSysMenu</a> (HMENU hMenuFrame, HWND hwndChild)</td></tr>
<tr class="separator:a4d32131a965be194567156981da95b09"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa300b1c82b580cb6f7134d6e719da13d"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#aa300b1c82b580cb6f7134d6e719da13d">MDIRemoveSysMenu</a> (HMENU hMenuFrame, HWND hwndChild, BOOL fRedraw)</td></tr>
<tr class="separator:aa300b1c82b580cb6f7134d6e719da13d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af1013497be51fe9a3aa1fc141aae281a"><td class="memItemLeft" align="right" valign="top">BOOL FAR PASCAL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#af1013497be51fe9a3aa1fc141aae281a">AppendToWindowsMenu</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndMDI, <a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndChild)</td></tr>
<tr class="separator:af1013497be51fe9a3aa1fc141aae281a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a396b1abec3545635b9e505035019a509"><td class="memItemLeft" align="right" valign="top">BOOL&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a396b1abec3545635b9e505035019a509">SwitchWindowsMenus</a> (HMENU hmenu, HMENU hOldWindow, HMENU hNewWindow)</td></tr>
<tr class="separator:a396b1abec3545635b9e505035019a509"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59b262b55c4f5b2ac115b815fa5fb7c5"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a59b262b55c4f5b2ac115b815fa5fb7c5">ShiftMenuIDs</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwnd, <a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndVictim)</td></tr>
<tr class="separator:a59b262b55c4f5b2ac115b815fa5fb7c5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1310a8c396c058795fff35d3a25181cc"><td class="memItemLeft" align="right" valign="top">HMENU&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a1310a8c396c058795fff35d3a25181cc">MDISetMenu</a> (<a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndMDI, BOOL fRefresh, HMENU hNewSys, HMENU hNewWindow)</td></tr>
<tr class="separator:a1310a8c396c058795fff35d3a25181cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab849decacdd2725fd368974bc24e2255"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#ab849decacdd2725fd368974bc24e2255">xxxInitActivateDlg</a> (HWND hwnd, <a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> pwndMDI)</td></tr>
<tr class="separator:ab849decacdd2725fd368974bc24e2255"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9f85b3a78dc078384aef7a4a34bfbf92"><td class="memItemLeft" align="right" valign="top">LONG&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#a9f85b3a78dc078384aef7a4a34bfbf92">MDIActivateDlgProcWorker</a> (HWND hwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wMsg, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wParam, LONG lParam, BOOL fAnsi)</td></tr>
<tr class="separator:a9f85b3a78dc078384aef7a4a34bfbf92"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af325eefdb4af81c06dfdad4cd7a5db2d"><td class="memItemLeft" align="right" valign="top">LONG WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#af325eefdb4af81c06dfdad4cd7a5db2d">MDIActivateDlgProcA</a> (HWND hwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> message, WPARAM wParam, LPARAM lParam)</td></tr>
<tr class="separator:af325eefdb4af81c06dfdad4cd7a5db2d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab4ffd37b8e75f99158010b432fe9ca58"><td class="memItemLeft" align="right" valign="top">LONG WINAPI&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="a00197.html#ab4ffd37b8e75f99158010b432fe9ca58">MDIActivateDlgProcW</a> (HWND hwnd, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> message, WPARAM wParam, LPARAM lParam)</td></tr>
<tr class="separator:ab4ffd37b8e75f99158010b432fe9ca58"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">函数说明</h2>
<a id="af1013497be51fe9a3aa1fc141aae281a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af1013497be51fe9a3aa1fc141aae281a">&#9670;&nbsp;</a></span>AppendToWindowsMenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL FAR PASCAL AppendToWindowsMenu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndMDI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndChild</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00387">387</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;{</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;    <a class="code" href="a01961.html">PMDI</a> pmdi;</div>
<div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;    WCHAR szMenuItem[165];</div>
<div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    <span class="keywordtype">int</span> item;</div>
<div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    MENUITEMINFO    mii;</div>
<div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160; </div>
<div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;<span class="comment">     * Get a pointer to the MDI structure</span></div>
<div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    pmdi = ((<a class="code" href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a>)pwndMDI)-&gt;pmdi;</div>
<div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160; </div>
<div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    item = ((int)pwndChild-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>) - FIRST(pmdi);</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160; </div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;    <span class="keywordflow">if</span> (WINDOW(pmdi) &amp;&amp; (item &lt; MAXITEMS)) {</div>
<div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        mii.cbSize = <span class="keyword">sizeof</span>(MENUITEMINFO);</div>
<div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        <span class="keywordflow">if</span> (!item) {</div>
<div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160; </div>
<div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;            <span class="comment">/*</span></div>
<div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;<span class="comment">             * Add separator before first item</span></div>
<div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;<span class="comment">             */</span></div>
<div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;            mii.fMask = MIIM_FTYPE;</div>
<div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;            mii.fMask = MIIM_TYPE;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;            mii.fType = MFT_SEPARATOR;</div>
<div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;            <span class="keywordflow">if</span> (!InsertMenuItem(WINDOW(pmdi), MFMWFP_NOITEM, TRUE, &amp;mii))</div>
<div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;                <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        }</div>
<div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160; </div>
<div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        <span class="keywordflow">if</span> (item == (MAXITEMS - 1))</div>
<div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;            LoadString(<a class="code" href="a00020.html#a821be27172eef7b5f9dc20f1b2ea5975">hmodUser</a>, STR_MOREWINDOWS, szMenuItem,</div>
<div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;                       <span class="keyword">sizeof</span>(szMenuItem) / <span class="keyword">sizeof</span>(WCHAR));</div>
<div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;        <span class="keywordflow">else</span></div>
<div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;            <a class="code" href="a00197.html#afc61df735e5335ec687432fc26b774a2">MakeMenuItem</a>(szMenuItem, pwndChild);</div>
<div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160; </div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;        mii.fMask = MIIM_ID | MIIM_STRING;</div>
<div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;        mii.fMask = MIIM_TYPE | MIIM_ID;</div>
<div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        mii.fType = MFT_STRING;</div>
<div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        mii.wID = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)pwndChild-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>;</div>
<div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;        mii.dwTypeData = szMenuItem;</div>
<div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;        mii.cch = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)-1;</div>
<div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;        <span class="keywordflow">if</span> (!InsertMenuItem(WINDOW(pmdi), MFMWFP_NOITEM, TRUE, &amp;mii))</div>
<div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;    }</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00020_source.html#l00041">hmodUser</a>, <a class="el" href="a00197_source.html#l00045">MakeMenuItem()</a>, <a class="el" href="a00365_source.html#l01413">tagWND::spmenu</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00197_source.html#l00541">MDISetMenu()</a>.</p>

</div>
</div>
<a id="a779ab41018bd3951528a4201d4b5a0fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a779ab41018bd3951528a4201d4b5a0fb">&#9670;&nbsp;</a></span>FindPwndChild()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a> FindPwndChild </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndMDI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wChildID</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00022">22</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;{</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndT;</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;    <span class="keywordflow">for</span> (pwndT = REBASEPWND(pwndMDI, spwndChild);</div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;            pwndT &amp;&amp; (pwndT-&gt;<a class="code" href="a02581.html#a9e4b9545017c505ebd9b8808bd470ab9">spwndOwner</a> || (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)pwndT-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a> != wChildID);</div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;            pwndT = REBASEPWND(pwndT, spwndNext))</div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;        ;</div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;    <span class="keywordflow">return</span> pwndT;</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01413">tagWND::spmenu</a>, <a class="el" href="a00365_source.html#l01394">tagWND::spwndOwner</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00200_source.html#l01879">DefFrameProcWorker()</a>, <a class="el" href="a00197_source.html#l00541">MDISetMenu()</a>, <a class="el" href="a00197_source.html#l00653">xxxInitActivateDlg()</a> , 以及 <a class="el" href="a00200_source.html#l01059">xxxMDIActivate()</a>.</p>

</div>
</div>
<a id="afc61df735e5335ec687432fc26b774a2"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afc61df735e5335ec687432fc26b774a2">&#9670;&nbsp;</a></span>MakeMenuItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int MakeMenuItem </td>
          <td>(</td>
          <td class="paramtype">LPWSTR&#160;</td>
          <td class="paramname"><em>lpOut</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00045">45</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;{</div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    <a class="code" href="a01961.html">PMDI</a> pmdi;</div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> rgParm;</div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    <span class="keywordtype">int</span> cch = 0;</div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    WCHAR <span class="keywordtype">string</span>[160];</div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    LPWSTR lpstr;</div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keywordtype">int</span> i = 0;</div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160; </div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment">     * Get a pointer to the MDI structure</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    pmdi = ((<a class="code" href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a>)(REBASEPWND(pwnd, spwndParent)))-&gt;pmdi;</div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160; </div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    *lpOut = 0;</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160; </div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;    rgParm = (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>)pwnd-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a> - (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>)FIRST(pmdi) + 1;</div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160; </div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;    <span class="keywordflow">if</span> (pwnd-&gt;<a class="code" href="a02581.html#a5242d6e2f6cd000e8a85dcd824104ec4">strName</a>.<a class="code" href="a02457.html#abfb371817eb1c8f0d8a165bb2b798092">Length</a>) {</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;        lpstr = REBASEALWAYS(pwnd, strName.Buffer);</div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160; </div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="comment">         * Search for an &amp; in the title string and duplicate it so that we don&#39;t</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="comment">         * get bogus accelerators.</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;        <span class="keywordflow">while</span> (*lpstr &amp;&amp; i &lt; ((<span class="keyword">sizeof</span>(<span class="keywordtype">string</span>) / <span class="keyword">sizeof</span>(WCHAR)) - 1)) {</div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;            <span class="keywordtype">string</span>[i] = *lpstr;</div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;            i++;</div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;            <span class="keywordflow">if</span> (*lpstr == TEXT(<span class="charliteral">&#39;&amp;&#39;</span>))</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                <span class="keywordtype">string</span>[i++] = TEXT(<span class="charliteral">&#39;&amp;&#39;</span>);</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;            lpstr++;</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;        }</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160; </div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160;        <span class="keywordtype">string</span>[i] = 0;</div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;        cch = <a class="code" href="a00938.html#af342e0e9b49a1c8b503ea5d49c6c863d">wsprintfW</a>(lpOut, L<span class="stringliteral">&quot;&amp;%d %ws&quot;</span>, rgParm, <span class="keywordtype">string</span>);</div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160; </div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;    } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160; </div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;<span class="comment">         * Handle the case of MDI children without any window title text.</span></div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        cch = <a class="code" href="a00938.html#af342e0e9b49a1c8b503ea5d49c6c863d">wsprintfW</a>(lpOut, L<span class="stringliteral">&quot;&amp;%d &quot;</span>, rgParm);</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;    }</div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160; </div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;    <span class="keywordflow">return</span> cch;</div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a00365_source.html#l00281">_LARGE_UNICODE_STRING::Length</a>, <a class="el" href="a00365_source.html#l01413">tagWND::spmenu</a>, <a class="el" href="a00365_source.html#l01414">tagWND::strName</a> , 以及 <a class="el" href="a00938_source.html#l00963">wsprintfW()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00197_source.html#l00387">AppendToWindowsMenu()</a> , 以及 <a class="el" href="a00197_source.html#l00102">ModifyMenuItem()</a>.</p>

</div>
</div>
<a id="af325eefdb4af81c06dfdad4cd7a5db2d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#af325eefdb4af81c06dfdad4cd7a5db2d">&#9670;&nbsp;</a></span>MDIActivateDlgProcA()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LONG WINAPI MDIActivateDlgProcA </td>
          <td>(</td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WPARAM&#160;</td>
          <td class="paramname"><em>wParam</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPARAM&#160;</td>
          <td class="paramname"><em>lParam</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00778">778</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;{</div>
<div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00197.html#a9f85b3a78dc078384aef7a4a34bfbf92">MDIActivateDlgProcWorker</a>(hwnd, message, wParam, lParam, TRUE);</div>
<div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00197_source.html#l00725">MDIActivateDlgProcWorker()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00035_source.html#l00749">ClientThreadSetup()</a> , 以及 <a class="el" href="a00200_source.html#l01879">DefFrameProcWorker()</a>.</p>

</div>
</div>
<a id="ab4ffd37b8e75f99158010b432fe9ca58"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab4ffd37b8e75f99158010b432fe9ca58">&#9670;&nbsp;</a></span>MDIActivateDlgProcW()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LONG WINAPI MDIActivateDlgProcW </td>
          <td>(</td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>message</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">WPARAM&#160;</td>
          <td class="paramname"><em>wParam</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LPARAM&#160;</td>
          <td class="paramname"><em>lParam</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00787">787</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;{</div>
<div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="a00197.html#a9f85b3a78dc078384aef7a4a34bfbf92">MDIActivateDlgProcWorker</a>(hwnd, message, wParam, lParam, FALSE);</div>
<div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00197_source.html#l00725">MDIActivateDlgProcWorker()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00035_source.html#l00749">ClientThreadSetup()</a> , 以及 <a class="el" href="a00200_source.html#l01879">DefFrameProcWorker()</a>.</p>

</div>
</div>
<a id="a9f85b3a78dc078384aef7a4a34bfbf92"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9f85b3a78dc078384aef7a4a34bfbf92">&#9670;&nbsp;</a></span>MDIActivateDlgProcWorker()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">LONG MDIActivateDlgProcWorker </td>
          <td>(</td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wMsg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>&#160;</td>
          <td class="paramname"><em>wParam</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">LONG&#160;</td>
          <td class="paramname"><em>lParam</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fAnsi</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00725">725</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;{</div>
<div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;    <span class="keywordtype">int</span> i;</div>
<div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160; </div>
<div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;    <span class="keywordflow">switch</span> (wMsg) {</div>
<div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;    <span class="keywordflow">case</span> WM_INITDIALOG:</div>
<div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160; </div>
<div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;<span class="comment">         * NOTE: Code above uses DialogBoxParam, passing pwndMDI in the low</span></div>
<div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;<span class="comment">         * word of the parameter...</span></div>
<div class="line"><a name="l00740"></a><span class="lineno">  740</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;        <a class="code" href="a00197.html#ab849decacdd2725fd368974bc24e2255">xxxInitActivateDlg</a>(hwnd, (<a class="code" href="a02581.html">PWND</a>)lParam);</div>
<div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160; </div>
<div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;    <span class="keywordflow">case</span> WM_COMMAND:</div>
<div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;        i = -2;</div>
<div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160; </div>
<div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;        <span class="keywordflow">switch</span> (LOWORD(wParam)) {</div>
<div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160; </div>
<div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;<span class="comment">         * Listbox doubleclicks act like OK...</span></div>
<div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;        <span class="keywordflow">case</span> 100:</div>
<div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;            <span class="keywordflow">if</span> (HIWORD(wParam) != LBN_DBLCLK)</div>
<div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;                <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160; </div>
<div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;<span class="comment">         ** FALL THRU **</span></div>
<div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;        <span class="keywordflow">case</span> IDOK:</div>
<div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;            i = (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)SendDlgItemMessage(hwnd, 100, LB_GETCURSEL, 0, 0L);</div>
<div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160; </div>
<div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00763"></a><span class="lineno">  763</span>&#160;<span class="comment">         ** FALL THRU **</span></div>
<div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;        <span class="keywordflow">case</span> IDCANCEL:</div>
<div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;            <a class="code" href="a00098.html#aa5a68d879547f0460331c71bee94763a">EndDialog</a>(hwnd, i);</div>
<div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;            <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;        <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;        }</div>
<div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;        <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;    <span class="keywordflow">default</span>:</div>
<div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;    }</div>
<div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00098_source.html#l00022">EndDialog()</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00197_source.html#l00653">xxxInitActivateDlg()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00197_source.html#l00778">MDIActivateDlgProcA()</a> , 以及 <a class="el" href="a00197_source.html#l00787">MDIActivateDlgProcW()</a>.</p>

</div>
</div>
<a id="a4d32131a965be194567156981da95b09"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4d32131a965be194567156981da95b09">&#9670;&nbsp;</a></span>MDIAddSysMenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL MDIAddSysMenu </td>
          <td>(</td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hMenuFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwndChild</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00165">165</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;{</div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndChild;</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    MENUITEMINFO    mii;</div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <a class="code" href="a02625.html">PMENU</a> pMenuChild;</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160; </div>
<div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160; </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;<span class="comment">// LATER -- look at passing pwndChild in -- FritzS</span></div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160; </div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    <a class="code" href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a>(<a class="code" href="a03743.html#ac5ede70e870dc1cf540d7524887e4edc">IsWindow</a>(hwndChild));</div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    pwndChild = <a class="code" href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a>(hwndChild);</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    <span class="keywordflow">if</span> (!hMenuFrame || !pwndChild || !pwndChild-&gt;<a class="code" href="a02581.html#aa9cb183920d0decbae34685c0451ff0f">spmenuSys</a>) {</div>
<div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;    }</div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160; </div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="comment">     * We don&#39;t need the pMenuChild pointer but the handle. However, if you</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;<span class="comment">     * do PtoH(_GetSubMenu()), you end up calling the function twice</span></div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    pMenuChild = <a class="code" href="a00365.html#aba13e2c42ad782876b82329b41921e4e">_GetSubMenu</a> (REBASEALWAYS(pwndChild, spmenuSys), 0);</div>
<div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;    <span class="keywordflow">if</span> (!pMenuChild) {</div>
<div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;    }</div>
<div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160; </div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;<span class="comment">// Add MDI system button as first menu item</span></div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    mii.cbSize = <span class="keyword">sizeof</span>(MENUITEMINFO);</div>
<div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;    mii.fMask = MIIM_SUBMENU | MIIM_DATA | MIIM_BITMAP;  <span class="comment">// Add MIIM_DATA because of hack described below</span></div>
<div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    mii.fMask = MIIM_SUBMENU | MIIM_TYPE | MIIM_DATA;  <span class="comment">// Add MIIM_DATA because of hack described below</span></div>
<div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;    mii.fType = MFT_BITMAP;</div>
<div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;    mii.hSubMenu = PtoH(pMenuChild);</div>
<div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;<span class="comment">// Fritzs -- this won&#39;t work.</span></div>
<div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;<span class="comment">//    mii.dwTypeData = (LPSTR) MAKELONG(MENUHBM_SYSTEM, GetWindowSmIcon(hwndChild));</span></div>
<div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;    mii.hbmpItem = (HBITMAP) MENUHBM_SYSTEM;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;    mii.dwTypeData = (LPWSTR) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) MENUHBM_SYSTEM;</div>
<div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;<span class="comment">// FritzS -- so, we sneak the icon into ItemData</span></div>
<div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;    mii.dwItemData = (ULONG)hwndChild;</div>
<div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160; </div>
<div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <span class="keywordflow">if</span> (!InsertMenuItem(hMenuFrame, 0, TRUE, &amp;mii))</div>
<div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160; </div>
<div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;    <span class="comment">// TimeLine 6.1 gets confused by the extra Min/Close buttons,</span></div>
<div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;    <span class="comment">// don&#39;t add them if WFOLDUI</span></div>
<div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160; </div>
<div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;    mii.fMask = MIIM_ID | MIIM_FTYPE | MIIM_BITMAP;</div>
<div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;    mii.fMask = MIIM_ID | MIIM_TYPE;</div>
<div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;    mii.fType |= MFT_RIGHTJUSTIFY;</div>
<div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160; </div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;    pwndChild = <a class="code" href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a>(hwndChild);</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;    <span class="keywordflow">if</span> (!pwndChild) {</div>
<div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;        <a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hMenuFrame, 0, MF_BYPOSITION);</div>
<div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;    }</div>
<div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160; </div>
<div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160; </div>
<div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;    <span class="keywordflow">if</span> (!TestWF(pwndChild, WFOLDUI))</div>
<div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;    {</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <span class="comment">// Add Minimize button as last menu item</span></div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        mii.hbmpItem = (HBITMAP) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) (TestWF(pwndChild, WFMINBOX) ? MENUHBM_MINIMIZE : MENUHBM_MINIMIZE_D);</div>
<div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;        mii.dwTypeData = (LPWSTR) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) (TestWF(pwndChild, WFMINBOX) ? MENUHBM_MINIMIZE : MENUHBM_MINIMIZE_D);</div>
<div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;        mii.wID = SC_MINIMIZE;</div>
<div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160; </div>
<div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;        <span class="keywordflow">if</span> (!InsertMenuItem(hMenuFrame, MFMWFP_NOITEM, TRUE, &amp;mii))</div>
<div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;        {</div>
<div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;            <a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hMenuFrame, 0, MF_BYPOSITION);</div>
<div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;        }</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        mii.fType &amp;= ~MFT_RIGHTJUSTIFY;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;    }</div>
<div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160; </div>
<div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;    <span class="comment">// Add Restore button as last menu item</span></div>
<div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;    mii.hbmpItem = (HBITMAP) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) MENUHBM_RESTORE;</div>
<div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;    mii.dwTypeData = (LPWSTR) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) MENUHBM_RESTORE;</div>
<div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;    mii.wID = SC_RESTORE;</div>
<div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160; </div>
<div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;    <span class="keywordflow">if</span> (!InsertMenuItem(hMenuFrame, MFMWFP_NOITEM, TRUE, &amp;mii)) {</div>
<div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;        <span class="comment">// BOGUS -- we gotta remove the MINIMIZE button too</span></div>
<div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;        <a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hMenuFrame, 0, MF_BYPOSITION);</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;    }</div>
<div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160; </div>
<div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    pwndChild = <a class="code" href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a>(hwndChild);</div>
<div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;    <span class="keywordflow">if</span> (!pwndChild) {</div>
<div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;        <a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hMenuFrame, 0, MF_BYPOSITION);</div>
<div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    }</div>
<div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160; </div>
<div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;    <span class="keywordflow">if</span> (!TestWF(pwndChild, WFOLDUI))</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;    {</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;        <span class="comment">// Add Close button as last menu item</span></div>
<div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        mii.hbmpItem = (HBITMAP) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) (<a class="code" href="a00365.html#a97cf597a555ebc0a9906a10df3382f33">_MNCanClose</a>(pwndChild) ? MENUHBM_CLOSE : MENUHBM_CLOSE_D);</div>
<div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        mii.dwTypeData = (LPWSTR) (<a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a>) (<a class="code" href="a00365.html#a97cf597a555ebc0a9906a10df3382f33">_MNCanClose</a>(pwndChild) ? MENUHBM_CLOSE : MENUHBM_CLOSE_D);</div>
<div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;        mii.wID = SC_CLOSE;</div>
<div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160; </div>
<div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;        <span class="keywordflow">if</span> (!InsertMenuItem(hMenuFrame, MFMWFP_NOITEM, TRUE, &amp;mii))</div>
<div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;        {</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;            <span class="comment">// BOGUS -- we gotta remove the MINIMIZE and RESTORE buttons too</span></div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;            <a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hMenuFrame, 0, MF_BYPOSITION);</div>
<div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;        }</div>
<div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;    }</div>
<div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160; </div>
<div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;<span class="comment">     * Set the menu items to proper state since we just maximized it.  Note</span></div>
<div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;<span class="comment">     * setsysmenu doesn&#39;t work if we&#39;ve cleared the sysmenu bit so do it now...</span></div>
<div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;    NtUserSetSysMenu(hwndChild);</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160; </div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;<span class="comment">     * This is so that if the user brings up the child sysmenu, it&#39;s sure</span></div>
<div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;<span class="comment">     * to be that in the frame menu bar...</span></div>
<div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;    <a class="code" href="a00026.html#a0cecedf7a462633cf5456292b526d8ec">ClearWindowState</a>(pwndChild, WFSYSMENU);</div>
<div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160; </div>
<div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;<span class="comment">     * Make sure that the child&#39;s frame is redrawn to reflect the removed</span></div>
<div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;<span class="comment">     * system menu.</span></div>
<div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;    NtUserRedrawFrame(hwndChild);</div>
<div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160; </div>
<div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03752_source.html#l00628">_GetSubMenu()</a>, <a class="el" href="a03599_source.html#l00078">_MNCanClose()</a>, <a class="el" href="a00026_source.html#l02834">ClearWindowState()</a>, <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a03743_source.html#l00421">IsWindow()</a>, <a class="el" href="a03614_source.html#l04404">NtUserRemoveMenu()</a>, <a class="el" href="a00365_source.html#l01412">tagWND::spmenuSys</a>, <a class="el" href="a00950_source.html#l00117">UserAssert</a> , 以及 <a class="el" href="a00293_source.html#l00090">ValidateHwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00200_source.html#l02489">MDICompleteChildCreation()</a>, <a class="el" href="a00197_source.html#l00541">MDISetMenu()</a> , 以及 <a class="el" href="a00200_source.html#l02179">xxxChildResize()</a>.</p>

</div>
</div>
<a id="aa300b1c82b580cb6f7134d6e719da13d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa300b1c82b580cb6f7134d6e719da13d">&#9670;&nbsp;</a></span>MDIRemoveSysMenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL MDIRemoveSysMenu </td>
          <td>(</td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hMenuFrame</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwndChild</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fRedraw</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00314">314</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;{</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;    <span class="keywordtype">int</span> iLastItem;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>    iLastCmd;</div>
<div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndChild;</div>
<div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160; </div>
<div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;<span class="comment">// LATER -- look at passing pwndChild in -- FritzS</span></div>
<div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160; </div>
<div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;    <span class="keywordflow">if</span> (hMenuFrame == NULL)</div>
<div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;        <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160; </div>
<div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;    pwndChild = <a class="code" href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a>(hwndChild);</div>
<div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160; </div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;    <span class="keywordflow">if</span> (pwndChild == NULL) <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160; </div>
<div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;    iLastItem = <a class="code" href="a03743.html#a198bfb6a02f377add1b153df79b8a22d">GetMenuItemCount</a>(hMenuFrame) - 1;</div>
<div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;    iLastCmd = TestWF(pwndChild, WFOLDUI) ? SC_RESTORE : SC_CLOSE;</div>
<div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160; </div>
<div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>) <a class="code" href="a03743.html#aae94c462edc57be0d6d68ba839002c37">GetMenuItemID</a>(hMenuFrame, iLastItem) != iLastCmd)</div>
<div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="keywordflow">return</span>(FALSE);</div>
<div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160; </div>
<div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;<span class="comment">     * Enable the sysmenu in the child window.</span></div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;    <a class="code" href="a00026.html#ab4added876586c5164dae9aaba3e7691">SetWindowState</a>(pwndChild, WFSYSMENU);</div>
<div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160; </div>
<div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;<span class="comment">     * Take the child sysmenu popup out of the frame menu.</span></div>
<div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;    <a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hMenuFrame, 0, MF_BYPOSITION);</div>
<div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160; </div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;<span class="comment">     * Delete the restore button from the menu bar.</span></div>
<div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;    <a class="code" href="a00362.html#a0fe7305d679920848bce8881016c3451">NtUserDeleteMenu</a>(hMenuFrame, iLastItem - 1, MF_BYPOSITION);</div>
<div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160; </div>
<div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    pwndChild = <a class="code" href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a>(hwndChild);</div>
<div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;    <span class="keywordflow">if</span> (pwndChild == NULL) <span class="keywordflow">return</span> FALSE;</div>
<div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160; </div>
<div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    <span class="keywordflow">if</span> (!TestWF(pwndChild, WFOLDUI))</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    {</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        <a class="code" href="a00362.html#a0fe7305d679920848bce8881016c3451">NtUserDeleteMenu</a>(hMenuFrame, iLastItem - 2, MF_BYPOSITION);</div>
<div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <a class="code" href="a00362.html#a0fe7305d679920848bce8881016c3451">NtUserDeleteMenu</a>(hMenuFrame, iLastItem - 3, MF_BYPOSITION);</div>
<div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    }</div>
<div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160; </div>
<div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;<span class="comment">     * Make sure that the child&#39;s frame is redrawn to reflect the added</span></div>
<div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;<span class="comment">     * system menu.</span></div>
<div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;    NtUserRedrawFrame(hwndChild);</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160; </div>
<div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a03743_source.html#l00357">GetMenuItemCount()</a>, <a class="el" href="a03743_source.html#l00378">GetMenuItemID()</a>, <a class="el" href="a03614_source.html#l02741">NtUserDeleteMenu()</a>, <a class="el" href="a03614_source.html#l04404">NtUserRemoveMenu()</a>, <a class="el" href="a00026_source.html#l02826">SetWindowState()</a>, <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a> , 以及 <a class="el" href="a00293_source.html#l00090">ValidateHwnd</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00200_source.html#l01481">MDIClientWndProcWorker()</a>, <a class="el" href="a00197_source.html#l00541">MDISetMenu()</a>, <a class="el" href="a00200_source.html#l02179">xxxChildResize()</a> , 以及 <a class="el" href="a00200_source.html#l01363">xxxMDIDestroy()</a>.</p>

</div>
</div>
<a id="a1310a8c396c058795fff35d3a25181cc"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a1310a8c396c058795fff35d3a25181cc">&#9670;&nbsp;</a></span>MDISetMenu()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">HMENU MDISetMenu </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndMDI</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">BOOL&#160;</td>
          <td class="paramname"><em>fRefresh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hNewSys</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hNewWindow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00541">541</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;{</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;    <span class="keywordtype">int</span> i;</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;    <span class="keywordtype">int</span> iFirst;</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;    <span class="keywordtype">int</span> item;</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;    <a class="code" href="a01961.html">PMDI</a> pmdi;</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndParent;</div>
<div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;    HMENU hOldSys;</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;    HMENU hOldWindow;</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndChild;</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160; </div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;<span class="comment">     * Get a pointer to the MDI structure</span></div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;    pmdi = ((<a class="code" href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a>)pwndMDI)-&gt;pmdi;</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160; </div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;<span class="comment">     * Save the old values</span></div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;    pwndParent = REBASEPWND(pwndMDI, spwndParent);</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;    hOldSys = <a class="code" href="a03743.html#ac9cce9d0a590697fbfd45e1d983b1454">GetMenu</a>(HW(pwndParent));</div>
<div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;    hOldWindow = WINDOW(pmdi);</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160; </div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;    <span class="keywordflow">if</span> (fRefresh) {</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;        hNewSys = hOldSys;</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;        hNewWindow = hOldWindow;</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;    }</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160; </div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;<span class="comment">     * Change the Frame Menu.</span></div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;    <span class="keywordflow">if</span> (hNewSys &amp;&amp; (hNewSys != hOldSys)) {</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;        <span class="keywordflow">if</span> (MAXED(pmdi))</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;            <a class="code" href="a00197.html#aa300b1c82b580cb6f7134d6e719da13d">MDIRemoveSysMenu</a>(hOldSys, MAXED(pmdi), FALSE);</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160; </div>
<div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;        <a class="code" href="a00362.html#a07f78a2bdef8db4e792f779d4b91a617">NtUserSetMenu</a>(HW(pwndParent), hNewSys, FALSE);</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160; </div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;        <span class="keywordflow">if</span> (MAXED(pmdi))</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;            <a class="code" href="a00197.html#a4d32131a965be194567156981da95b09">MDIAddSysMenu</a>(hNewSys, MAXED(pmdi));</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;    } <span class="keywordflow">else</span></div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;        hNewSys = hOldSys;</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160; </div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;<span class="comment">     * Now update the Window menu.</span></div>
<div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;    <span class="keywordflow">if</span> (fRefresh || (hOldWindow != hNewWindow)) {</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;        iFirst = FIRST(pmdi);</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160; </div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;        <span class="keywordflow">if</span> (hOldWindow) {</div>
<div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;            <span class="keywordtype">int</span> cItems = <a class="code" href="a03743.html#a198bfb6a02f377add1b153df79b8a22d">GetMenuItemCount</a>(hOldWindow);</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160; </div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;            <span class="keywordflow">for</span> (i = cItems - 1; i &gt;= 0; i--) {</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="a03743.html#ab32ddd495db86d76b8997a20b260f6b4">GetMenuState</a>(hOldWindow, i, MF_BYPOSITION) &amp; MF_SEPARATOR)</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;                   <span class="keywordflow">break</span>;</div>
<div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;            }</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;            <span class="keywordflow">if</span> ((i &gt;= 0) &amp;&amp; (<a class="code" href="a03743.html#aae94c462edc57be0d6d68ba839002c37">GetMenuItemID</a>(hOldWindow, i + 1) == (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)iFirst)) {</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;                <span class="keywordtype">int</span> idTrim = i;</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160; </div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;                <span class="keywordflow">for</span> (i = idTrim; i &lt; cItems; i++)</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;                    <a class="code" href="a00362.html#a0fe7305d679920848bce8881016c3451">NtUserDeleteMenu</a>(hOldWindow, idTrim, MF_BYPOSITION);</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;            }</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;        }</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160; </div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        Lock(&amp;WINDOW(pmdi), hNewWindow);</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160; </div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;        <span class="keywordflow">if</span> (hNewWindow != NULL) {</div>
<div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160; </div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;           <span class="comment">/*</span></div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;<span class="comment">            * Add the list of child windows to the new window</span></div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;<span class="comment">            */</span></div>
<div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;           <span class="keywordflow">for</span> (i = 0, item = 0; ((<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)i &lt; CKIDS(pmdi)) &amp;&amp; (item &lt; MAXITEMS);</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;                    i++) {</div>
<div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;               pwndChild = <a class="code" href="a00197.html#a779ab41018bd3951528a4201d4b5a0fb">FindPwndChild</a>(pwndMDI, iFirst + item);</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;               <span class="keywordflow">if</span> (pwndChild != NULL) {</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;                   <span class="keywordflow">if</span> ((!TestWF(pwndChild, WFVISIBLE) &amp;&amp;</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;                          (LOWORD(pwndMDI-&gt;style) &amp; 0x0001)) ||</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;                          TestWF(pwndChild, WFDISABLED)) {</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;                       <a class="code" href="a00197.html#a59b262b55c4f5b2ac115b815fa5fb7c5">ShiftMenuIDs</a>(pwndMDI, pwndChild);</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;                   } <span class="keywordflow">else</span> {</div>
<div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;                       <a class="code" href="a00197.html#af1013497be51fe9a3aa1fc141aae281a">AppendToWindowsMenu</a>(pwndMDI, pwndChild);</div>
<div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;                       item++;</div>
<div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;                   }</div>
<div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;               }</div>
<div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;           }</div>
<div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160; </div>
<div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;           <span class="comment">/*</span></div>
<div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;<span class="comment">            * Add checkmark by the active child&#39;s menu item</span></div>
<div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;<span class="comment">            */</span></div>
<div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;           <span class="keywordflow">if</span> (ACTIVE(pmdi))</div>
<div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;               <a class="code" href="a00203.html#a93eb9296d81e8c954f5f74fa8e4a7246">CheckMenuItem</a>(hNewWindow, (WORD)GetWindowID(ACTIVE(pmdi)),</div>
<div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;                       MF_BYCOMMAND | MF_CHECKED);</div>
<div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;        }</div>
<div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160; </div>
<div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;<span class="comment">         * Out with the old, in with the new</span></div>
<div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;        <a class="code" href="a00197.html#a396b1abec3545635b9e505035019a509">SwitchWindowsMenus</a>(hNewSys, hOldWindow, hNewWindow);</div>
<div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;    }</div>
<div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;    <span class="keywordflow">return</span> hOldSys;</div>
<div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00197_source.html#l00387">AppendToWindowsMenu()</a>, <a class="el" href="a00203_source.html#l00031">CheckMenuItem()</a>, <a class="el" href="a00197_source.html#l00022">FindPwndChild()</a>, <a class="el" href="a03743_source.html#l00324">GetMenu()</a>, <a class="el" href="a03743_source.html#l00357">GetMenuItemCount()</a>, <a class="el" href="a03743_source.html#l00378">GetMenuItemID()</a>, <a class="el" href="a03743_source.html#l00404">GetMenuState()</a>, <a class="el" href="a00197_source.html#l00165">MDIAddSysMenu()</a>, <a class="el" href="a00197_source.html#l00314">MDIRemoveSysMenu()</a>, <a class="el" href="a03614_source.html#l02741">NtUserDeleteMenu()</a>, <a class="el" href="a03614_source.html#l04615">NtUserSetMenu()</a>, <a class="el" href="a00197_source.html#l00509">ShiftMenuIDs()</a>, <a class="el" href="a00197_source.html#l00451">SwitchWindowsMenus()</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00200_source.html#l01481">MDIClientWndProcWorker()</a>.</p>

</div>
</div>
<a id="a953c4e7b37f089bee9b2e339c2df42ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a953c4e7b37f089bee9b2e339c2df42ef">&#9670;&nbsp;</a></span>ModifyMenuItem()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ModifyMenuItem </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00102">102</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;{</div>
<div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;    <a class="code" href="a01961.html">PMDI</a> pmdi;</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    WCHAR sz[200];</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    MENUITEMINFO    mii;</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndParent;</div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;    <a class="code" href="a02625.html">PMENU</a> pmenu;</div>
<div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160; </div>
<div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;<span class="comment">     * Get a pointer to the MDI structure</span></div>
<div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;    pwndParent = REBASEPWND(pwnd, spwndParent);</div>
<div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    pmdi = ((<a class="code" href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a>)pwndParent)-&gt;pmdi;</div>
<div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160; </div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;    <span class="keywordflow">if</span> ((<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)pwnd-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a> &gt; FIRST(pmdi) + (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)8)</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        <span class="keywordflow">return</span>;</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160; </div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    mii.cbSize = <span class="keyword">sizeof</span>(MENUITEMINFO);</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    mii.fMask = MIIM_STRING;</div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;    mii.fMask = MIIM_TYPE;</div>
<div class="line"><a name="l00125"></a><span class="lineno">  125</span>&#160;    mii.fType = MFT_STRING;</div>
<div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    mii.dwTypeData = sz;</div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160; </div>
<div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;<span class="comment">     * Parent is MDI Client.</span></div>
<div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;    <a class="code" href="a00197.html#afc61df735e5335ec687432fc26b774a2">MakeMenuItem</a>(sz, pwnd);</div>
<div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="comment">     * Changing the active child?  Check it.</span></div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    <span class="keywordflow">if</span> (HWq(pwnd) == ACTIVE(pmdi)) {</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;        mii.fMask |= MIIM_STATE;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;        mii.fState = MFS_CHECKED;</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    }</div>
<div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160; </div>
<div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;    pwndParent = REBASEPWND(pwndParent, spwndParent);</div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div>
<div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    <span class="keywordflow">if</span> (pwndParent-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>) {</div>
<div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160; </div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="comment">/*</span></div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;<span class="comment">         * Bug# 21566. If spmenu is NULL we used to fail</span></div>
<div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;<span class="comment">         * because REBASEALWAYS is trying to get the kernel</span></div>
<div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;<span class="comment">         * address of NULL based on pwndParent</span></div>
<div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;<span class="comment">         */</span></div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        pmenu = REBASEALWAYS(pwndParent, spmenu);</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;        SetMenuItemInfo(PtoH(pmenu), (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)pwnd-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>, FALSE, &amp;mii);</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;    }</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00197_source.html#l00045">MakeMenuItem()</a>, <a class="el" href="a00365_source.html#l01413">tagWND::spmenu</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00200_source.html#l02285">DefMDIChildProcWorker()</a> , 以及 <a class="el" href="a00200_source.html#l01059">xxxMDIActivate()</a>.</p>

</div>
</div>
<a id="a59b262b55c4f5b2ac115b815fa5fb7c5"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a59b262b55c4f5b2ac115b815fa5fb7c5">&#9670;&nbsp;</a></span>ShiftMenuIDs()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void ShiftMenuIDs </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndVictim</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00509">509</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;{</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;    <a class="code" href="a01961.html">PMDI</a> pmdi;</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndChild;</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndParent;</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;<span class="comment">     * Get a pointer to the MDI structure</span></div>
<div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;    pmdi = ((<a class="code" href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a>)pwnd)-&gt;pmdi;</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160; </div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;    pwndParent = REBASEPWND(pwndVictim, spwndParent);</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;    pwndChild = REBASEPWND(pwndParent, spwndChild);</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160; </div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;    <span class="keywordflow">while</span> (pwndChild) {</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;        <span class="keywordflow">if</span> (!pwndChild-&gt;<a class="code" href="a02581.html#a9e4b9545017c505ebd9b8808bd470ab9">spwndOwner</a> &amp;&amp; (pwndChild-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a> &gt; pwndVictim-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a>)) {</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;            SetWindowLong(HWq(pwndChild), GWL_ID, (LONG)pwndChild-&gt;<a class="code" href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">spmenu</a> - 1);</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        }</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;        pwndChild = REBASEPWND(pwndChild, spwndNext);</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;    }</div>
<div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160; </div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;    SetWindowLong(HWq(pwndVictim), GWL_ID, FIRST(pmdi) + CKIDS(pmdi) - 1);</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00365_source.html#l01413">tagWND::spmenu</a> , 以及 <a class="el" href="a00365_source.html#l01394">tagWND::spwndOwner</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00197_source.html#l00541">MDISetMenu()</a> , 以及 <a class="el" href="a00200_source.html#l01363">xxxMDIDestroy()</a>.</p>

</div>
</div>
<a id="a396b1abec3545635b9e505035019a509"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a396b1abec3545635b9e505035019a509">&#9670;&nbsp;</a></span>SwitchWindowsMenus()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">BOOL SwitchWindowsMenus </td>
          <td>(</td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hmenu</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hOldWindow</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">HMENU&#160;</td>
          <td class="paramname"><em>hNewWindow</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00451">451</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00455"></a><span class="lineno">  455</span>&#160;{</div>
<div class="line"><a name="l00456"></a><span class="lineno">  456</span>&#160;    <span class="keywordtype">int</span> i;</div>
<div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;    HMENU hsubMenu;</div>
<div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;    WCHAR szMenuName[128];</div>
<div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;    MENUITEMINFO    mii;</div>
<div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160; </div>
<div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;    <span class="keywordflow">if</span> (hOldWindow == hNewWindow)</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        <span class="keywordflow">return</span> TRUE;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160; </div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;    mii.cbSize = <span class="keyword">sizeof</span>(MENUITEMINFO);</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160; </div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="comment">     * Determine position of old &quot;Window&quot; menu</span></div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;    <span class="keywordflow">for</span> (i = 0; hsubMenu = <a class="code" href="a03743.html#ad4d1c0493ddaed6f7a75c7cdab06756d">GetSubMenu</a>(hmenu, i); i++) {</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;        <span class="keywordflow">if</span> (hsubMenu == hOldWindow)</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;        {</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;            <span class="comment">// Extract the name of the old menu to use it for the new menu</span></div>
<div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;            mii.fMask = MIIM_STRING;</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;            mii.fMask = MIIM_TYPE;</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;            mii.dwTypeData = szMenuName;</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;            mii.cch = <span class="keyword">sizeof</span>(szMenuName)/<span class="keyword">sizeof</span>(WCHAR);</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;<span class="preprocessor">#ifdef MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;            <a class="code" href="a00257.html#aa69eb759ac235e9d187c7496ee00a001">GetMenuItemInfoInternal</a>(hmenu, i, TRUE, &amp;mii);</div>
<div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;<span class="preprocessor">#else // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;            GetMenuItemInfo(hmenu, i, TRUE, &amp;mii);</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;<span class="preprocessor">#endif // MEMPHIS_MENUS</span></div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;            <span class="comment">// Out with the old, in with the new</span></div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;            <span class="keywordflow">if</span> (!<a class="code" href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a>(hmenu, i, MF_BYPOSITION))</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;                <span class="keywordflow">return</span>(FALSE);</div>
<div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160; </div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;            mii.fMask |= MIIM_SUBMENU;</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;            mii.hSubMenu = hNewWindow;</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;            <span class="keywordflow">return</span>(InsertMenuItem(hmenu, i, TRUE, &amp;mii));</div>
<div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;        }</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    }</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160; </div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;    <span class="keywordflow">return</span>(FALSE);</div>
<div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00257.html#aa69eb759ac235e9d187c7496ee00a001">GetMenuItemInfoInternal()</a>, <a class="el" href="a03743_source.html#l00493">GetSubMenu()</a> , 以及 <a class="el" href="a03614_source.html#l04404">NtUserRemoveMenu()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00197_source.html#l00541">MDISetMenu()</a>.</p>

</div>
</div>
<a id="ab849decacdd2725fd368974bc24e2255"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab849decacdd2725fd368974bc24e2255">&#9670;&nbsp;</a></span>xxxInitActivateDlg()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void xxxInitActivateDlg </td>
          <td>(</td>
          <td class="paramtype">HWND&#160;</td>
          <td class="paramname"><em>hwnd</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="a00365.html#a1a2ef1c363aa0787a8f8a7dde2a34aaf">PWND</a>&#160;</td>
          <td class="paramname"><em>pwndMDI</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="a00197_source.html">mdimenu.c</a> 第 <a class="el" href="a00197_source.html#l00653">653</a> 行定义.</p>
<div class="fragment"><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;{</div>
<div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;    <a class="code" href="a01961.html">PMDI</a> pmdi;</div>
<div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;    <a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a> wKid;</div>
<div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;    HWND hwndT;</div>
<div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;    <a class="code" href="a02581.html">PWND</a> pwndT;</div>
<div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    WCHAR szTitle[CCHTITLEMAX];</div>
<div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;    <a class="code" href="a01881.html">TL</a> tlpwndT;</div>
<div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;    SIZE Size;</div>
<div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;    HDC hDC;</div>
<div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    <a class="code" href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a> width = 0;</div>
<div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160; </div>
<div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;    <a class="code" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a>(pwndMDI);</div>
<div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160; </div>
<div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;<span class="comment">     * Get a pointer to the MDI structure</span></div>
<div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;    pmdi = ((<a class="code" href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a>)pwndMDI)-&gt;pmdi;</div>
<div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160; </div>
<div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    hDC = <a class="code" href="a00362.html#a1eefde3313bfafab921776948a45e595">NtUserGetDC</a>(hwnd);</div>
<div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160; </div>
<div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00677"></a><span class="lineno">  677</span>&#160;<span class="comment">     * Insert the list of titles.</span></div>
<div class="line"><a name="l00678"></a><span class="lineno">  678</span>&#160;<span class="comment">     * Note the wKid-th item in the listbox has ID wKid+FIRST(pwnd), so that</span></div>
<div class="line"><a name="l00679"></a><span class="lineno">  679</span>&#160;<span class="comment">     * the listbox is in creation order (like the menu).  This is also</span></div>
<div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;<span class="comment">     * helpful when we go to select one...</span></div>
<div class="line"><a name="l00681"></a><span class="lineno">  681</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00682"></a><span class="lineno">  682</span>&#160; </div>
<div class="line"><a name="l00683"></a><span class="lineno">  683</span>&#160;    <span class="keywordflow">for</span> (wKid = 0; wKid &lt; CKIDS(pmdi); wKid++) {</div>
<div class="line"><a name="l00684"></a><span class="lineno">  684</span>&#160;        pwndT = <a class="code" href="a00197.html#a779ab41018bd3951528a4201d4b5a0fb">FindPwndChild</a>(pwndMDI, (<a class="code" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a>)(wKid + FIRST(pmdi)));</div>
<div class="line"><a name="l00685"></a><span class="lineno">  685</span>&#160; </div>
<div class="line"><a name="l00686"></a><span class="lineno">  686</span>&#160;        <span class="keywordflow">if</span> (pwndT &amp;&amp; TestWF(pwndT, WFVISIBLE) &amp;&amp; !TestWF(pwndT, WFDISABLED)) {</div>
<div class="line"><a name="l00687"></a><span class="lineno">  687</span>&#160;            ThreadLockAlways(pwndT, &amp;tlpwndT);</div>
<div class="line"><a name="l00688"></a><span class="lineno">  688</span>&#160;            GetWindowText(HWq(pwndT), szTitle, CCHTITLEMAX);</div>
<div class="line"><a name="l00689"></a><span class="lineno">  689</span>&#160;            SendDlgItemMessage(hwnd, 100, LB_ADDSTRING, 0, (LONG)szTitle);</div>
<div class="line"><a name="l00690"></a><span class="lineno">  690</span>&#160;            GetTextExtentPoint(hDC, szTitle, lstrlen(szTitle), &amp;Size);</div>
<div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;            <span class="keywordflow">if</span> (Size.cx &gt; (LONG)width) {</div>
<div class="line"><a name="l00692"></a><span class="lineno">  692</span>&#160;                width = Size.cx;</div>
<div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;            }</div>
<div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;            ThreadUnlock(&amp;tlpwndT);</div>
<div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;        }</div>
<div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;    }</div>
<div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160; </div>
<div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;<span class="comment">     * Select the currently active window.</span></div>
<div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;    SendDlgItemMessage(hwnd, 100, LB_SETTOPINDEX, MAXITEMS - 1, 0L);</div>
<div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;    SendDlgItemMessage(hwnd, 100, LB_SETCURSEL, MAXITEMS - 1, 0L);</div>
<div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160; </div>
<div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;<span class="comment">     * Set the horizontal extent of the list box to the longest window title.</span></div>
<div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;    SendDlgItemMessage(hwnd, 100, LB_SETHORIZONTALEXTENT, width, 0L);</div>
<div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;    NtUserReleaseDC(hwnd, hDC);</div>
<div class="line"><a name="l00709"></a><span class="lineno">  709</span>&#160; </div>
<div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;    <span class="comment">/*</span></div>
<div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;<span class="comment">     * Set the focus to the listbox.</span></div>
<div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;<span class="comment">     */</span></div>
<div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;    hwndT = <a class="code" href="a03743.html#a8cdabe45f534639f8a257cfc260d3736">GetDlgItem</a>(hwnd, 100);</div>
<div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;    <a class="code" href="a00362.html#a3aa84979aeb1f89caa4217dc0f88b104">NtUserSetFocus</a>(hwndT);</div>
<div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;}</div>
</div><!-- fragment -->
<p class="reference">引用了 <a class="el" href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock()</a>, <a class="el" href="a00563_source.html#l00175">DWORD</a>, <a class="el" href="a00197_source.html#l00022">FindPwndChild()</a>, <a class="el" href="a03743_source.html#l00268">GetDlgItem()</a>, <a class="el" href="a03614_source.html#l05248">NtUserGetDC()</a>, <a class="el" href="a03614_source.html#l04594">NtUserSetFocus()</a> , 以及 <a class="el" href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT()</a>.</p>

<p class="reference">被这些函数引用 <a class="el" href="a00197_source.html#l00725">MDIActivateDlgProcWorker()</a>.</p>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<div class="ttc" id="aa00026_html_ab4added876586c5164dae9aaba3e7691"><div class="ttname"><a href="a00026.html#ab4added876586c5164dae9aaba3e7691">SetWindowState</a></div><div class="ttdeci">void SetWindowState(PWND pwnd, UINT flags)</div><div class="ttdef"><b>Definition:</b> <a href="a00026_source.html#l02826">client.c:2826</a></div></div>
<div class="ttc" id="aa02581_html_a9e4b9545017c505ebd9b8808bd470ab9"><div class="ttname"><a href="a02581.html#a9e4b9545017c505ebd9b8808bd470ab9">tagWND::spwndOwner</a></div><div class="ttdeci">struct tagWND * spwndOwner</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01394">user.h:1394</a></div></div>
<div class="ttc" id="aa00020_html_a821be27172eef7b5f9dc20f1b2ea5975"><div class="ttname"><a href="a00020.html#a821be27172eef7b5f9dc20f1b2ea5975">hmodUser</a></div><div class="ttdeci">HMODULE hmodUser</div><div class="ttdef"><b>Definition:</b> <a href="a00020_source.html#l00041">clglobal.c:41</a></div></div>
<div class="ttc" id="aa02581_html_aa9cb183920d0decbae34685c0451ff0f"><div class="ttname"><a href="a02581.html#aa9cb183920d0decbae34685c0451ff0f">tagWND::spmenuSys</a></div><div class="ttdeci">struct tagMENU * spmenuSys</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01412">user.h:1412</a></div></div>
<div class="ttc" id="aa00365_html_aba13e2c42ad782876b82329b41921e4e"><div class="ttname"><a href="a00365.html#aba13e2c42ad782876b82329b41921e4e">_GetSubMenu</a></div><div class="ttdeci">PMENU _GetSubMenu(PMENU pMenu, int nPos)</div><div class="ttdef"><b>Definition:</b> <a href="a03752_source.html#l00628">rtl/wow.c:628</a></div></div>
<div class="ttc" id="aa03743_html_aae94c462edc57be0d6d68ba839002c37"><div class="ttname"><a href="a03743.html#aae94c462edc57be0d6d68ba839002c37">GetMenuItemID</a></div><div class="ttdeci">UINT GetMenuItemID(HMENU hMenu, int nPos)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00378">client/wow.c:378</a></div></div>
<div class="ttc" id="aa00197_html_a9f85b3a78dc078384aef7a4a34bfbf92"><div class="ttname"><a href="a00197.html#a9f85b3a78dc078384aef7a4a34bfbf92">MDIActivateDlgProcWorker</a></div><div class="ttdeci">LONG MDIActivateDlgProcWorker(HWND hwnd, UINT wMsg, UINT wParam, LONG lParam, BOOL fAnsi)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00725">mdimenu.c:725</a></div></div>
<div class="ttc" id="aa00362_html_a1eefde3313bfafab921776948a45e595"><div class="ttname"><a href="a00362.html#a1eefde3313bfafab921776948a45e595">NtUserGetDC</a></div><div class="ttdeci">HDC NtUserGetDC(IN HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l05248">kernel/ntstubs.c:5248</a></div></div>
<div class="ttc" id="aa03743_html_ac5ede70e870dc1cf540d7524887e4edc"><div class="ttname"><a href="a03743.html#ac5ede70e870dc1cf540d7524887e4edc">IsWindow</a></div><div class="ttdeci">BOOL IsWindow(HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00421">client/wow.c:421</a></div></div>
<div class="ttc" id="aa00371_html_a162a73e20dfabca084a3ebb4581631a8"><div class="ttname"><a href="a00371.html#a162a73e20dfabca084a3ebb4581631a8">UserAssert</a></div><div class="ttdeci">#define UserAssert(exp)</div><div class="ttdef"><b>Definition:</b> <a href="a00950_source.html#l00117">usersrv.h:117</a></div></div>
<div class="ttc" id="aa00197_html_a4d32131a965be194567156981da95b09"><div class="ttname"><a href="a00197.html#a4d32131a965be194567156981da95b09">MDIAddSysMenu</a></div><div class="ttdeci">BOOL MDIAddSysMenu(HMENU hMenuFrame, HWND hwndChild)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00165">mdimenu.c:165</a></div></div>
<div class="ttc" id="aa00257_html_a8fbbab4c887a01986a0cf83e1fba2554"><div class="ttname"><a href="a00257.html#a8fbbab4c887a01986a0cf83e1fba2554">PMDIWND</a></div><div class="ttdeci">struct tagMDIWND * PMDIWND</div></div>
<div class="ttc" id="aa02581_html_a5242d6e2f6cd000e8a85dcd824104ec4"><div class="ttname"><a href="a02581.html#a5242d6e2f6cd000e8a85dcd824104ec4">tagWND::strName</a></div><div class="ttdeci">LARGE_UNICODE_STRING strName</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01414">user.h:1414</a></div></div>
<div class="ttc" id="aa00362_html_a3aa84979aeb1f89caa4217dc0f88b104"><div class="ttname"><a href="a00362.html#a3aa84979aeb1f89caa4217dc0f88b104">NtUserSetFocus</a></div><div class="ttdeci">HWND NtUserSetFocus(IN HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04594">kernel/ntstubs.c:4594</a></div></div>
<div class="ttc" id="aa00197_html_a779ab41018bd3951528a4201d4b5a0fb"><div class="ttname"><a href="a00197.html#a779ab41018bd3951528a4201d4b5a0fb">FindPwndChild</a></div><div class="ttdeci">PWND FindPwndChild(PWND pwndMDI, UINT wChildID)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00022">mdimenu.c:22</a></div></div>
<div class="ttc" id="aa00938_html_af342e0e9b49a1c8b503ea5d49c6c863d"><div class="ttname"><a href="a00938.html#af342e0e9b49a1c8b503ea5d49c6c863d">wsprintfW</a></div><div class="ttdeci">int WINAPIV wsprintfW(LPWSTR lpOut, LPCWSTR lpFmt,...)</div><div class="ttdef"><b>Definition:</b> <a href="a00938_source.html#l00963">wsprintf.c:963</a></div></div>
<div class="ttc" id="aa03743_html_a8cdabe45f534639f8a257cfc260d3736"><div class="ttname"><a href="a03743.html#a8cdabe45f534639f8a257cfc260d3736">GetDlgItem</a></div><div class="ttdeci">HWND GetDlgItem(HWND hwnd, int id)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00268">client/wow.c:268</a></div></div>
<div class="ttc" id="aa00362_html_a0fe7305d679920848bce8881016c3451"><div class="ttname"><a href="a00362.html#a0fe7305d679920848bce8881016c3451">NtUserDeleteMenu</a></div><div class="ttdeci">BOOL NtUserDeleteMenu(IN HMENU hmenu, IN UINT nPosition, IN UINT dwFlags)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l02741">kernel/ntstubs.c:2741</a></div></div>
<div class="ttc" id="aa03743_html_ab32ddd495db86d76b8997a20b260f6b4"><div class="ttname"><a href="a03743.html#ab32ddd495db86d76b8997a20b260f6b4">GetMenuState</a></div><div class="ttdeci">UINT GetMenuState(HMENU hMenu, UINT uId, UINT uFlags)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00404">client/wow.c:404</a></div></div>
<div class="ttc" id="aa03743_html_ad4d1c0493ddaed6f7a75c7cdab06756d"><div class="ttname"><a href="a03743.html#ad4d1c0493ddaed6f7a75c7cdab06756d">GetSubMenu</a></div><div class="ttdeci">HMENU GetSubMenu(HMENU hMenu, int nPos)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00493">client/wow.c:493</a></div></div>
<div class="ttc" id="aa00197_html_af1013497be51fe9a3aa1fc141aae281a"><div class="ttname"><a href="a00197.html#af1013497be51fe9a3aa1fc141aae281a">AppendToWindowsMenu</a></div><div class="ttdeci">BOOL FAR PASCAL AppendToWindowsMenu(PWND pwndMDI, PWND pwndChild)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00387">mdimenu.c:387</a></div></div>
<div class="ttc" id="aa02625_html"><div class="ttname"><a href="a02625.html">tagMENU</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01992">user.h:1992</a></div></div>
<div class="ttc" id="aa00563_html_a074685e97e89d6aa2accdfcb82328699"><div class="ttname"><a href="a00563.html#a074685e97e89d6aa2accdfcb82328699">DWORD</a></div><div class="ttdeci">ddeml v[i&lt; inst &gt;][t&lt; type &gt;][hObj|pObj] Dump DDEML state information ddeml lists all ddeml instances for this process n ddeml t&lt; type &gt; lists all ddeml objects of the given type n n assumes link is first DWORD</div><div class="ttdef"><b>Definition:</b> <a href="a00563_source.html#l00175">exts.h:175</a></div></div>
<div class="ttc" id="aa00026_html_a0cecedf7a462633cf5456292b526d8ec"><div class="ttname"><a href="a00026.html#a0cecedf7a462633cf5456292b526d8ec">ClearWindowState</a></div><div class="ttdeci">void ClearWindowState(PWND pwnd, UINT flags)</div><div class="ttdef"><b>Definition:</b> <a href="a00026_source.html#l02834">client.c:2834</a></div></div>
<div class="ttc" id="aa02581_html_ad680eabbc65eb4d160362e2c73a19994"><div class="ttname"><a href="a02581.html#ad680eabbc65eb4d160362e2c73a19994">tagWND::spmenu</a></div><div class="ttdeci">struct tagMENU * spmenu</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01413">user.h:1413</a></div></div>
<div class="ttc" id="aa01881_html"><div class="ttname"><a href="a01881.html">_TL</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l00347">usercli.h:347</a></div></div>
<div class="ttc" id="aa00197_html_a59b262b55c4f5b2ac115b815fa5fb7c5"><div class="ttname"><a href="a00197.html#a59b262b55c4f5b2ac115b815fa5fb7c5">ShiftMenuIDs</a></div><div class="ttdeci">void ShiftMenuIDs(PWND pwnd, PWND pwndVictim)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00509">mdimenu.c:509</a></div></div>
<div class="ttc" id="aa00362_html_a07f78a2bdef8db4e792f779d4b91a617"><div class="ttname"><a href="a00362.html#a07f78a2bdef8db4e792f779d4b91a617">NtUserSetMenu</a></div><div class="ttdeci">BOOL NtUserSetMenu(IN HWND hwnd, IN HMENU hmenu, IN BOOL fRedraw)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04615">kernel/ntstubs.c:4615</a></div></div>
<div class="ttc" id="aa02581_html"><div class="ttname"><a href="a02581.html">tagWND</a></div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l01388">user.h:1388</a></div></div>
<div class="ttc" id="aa00197_html_ab849decacdd2725fd368974bc24e2255"><div class="ttname"><a href="a00197.html#ab849decacdd2725fd368974bc24e2255">xxxInitActivateDlg</a></div><div class="ttdeci">void xxxInitActivateDlg(HWND hwnd, PWND pwndMDI)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00653">mdimenu.c:653</a></div></div>
<div class="ttc" id="aa00257_html_aa69eb759ac235e9d187c7496ee00a001"><div class="ttname"><a href="a00257.html#aa69eb759ac235e9d187c7496ee00a001">GetMenuItemInfoInternal</a></div><div class="ttdeci">BOOL GetMenuItemInfoInternal(HMENU hMenu, UINT uID, BOOL fByPosition, LPMENUITEMINFO lpInfo)</div></div>
<div class="ttc" id="aa01961_html"><div class="ttname"><a href="a01961.html">tagMDI</a></div><div class="ttdef"><b>Definition:</b> <a href="a00257_source.html#l02233">usercli.h:2233</a></div></div>
<div class="ttc" id="aa00203_html_a93eb9296d81e8c954f5f74fa8e4a7246"><div class="ttname"><a href="a00203.html#a93eb9296d81e8c954f5f74fa8e4a7246">CheckMenuItem</a></div><div class="ttdeci">DWORD CheckMenuItem(HMENU hMenu, UINT uIDCheckItem, UINT uCheck)</div><div class="ttdef"><b>Definition:</b> <a href="a00203_source.html#l00031">menuc.c:31</a></div></div>
<div class="ttc" id="aa00293_html_a41d387d1b2d42169cbaa2092c8a02abf"><div class="ttname"><a href="a00293.html#a41d387d1b2d42169cbaa2092c8a02abf">ValidateHwnd</a></div><div class="ttdeci">#define ValidateHwnd(hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a00293_source.html#l00090">immcli.h:90</a></div></div>
<div class="ttc" id="aa02457_html_abfb371817eb1c8f0d8a165bb2b798092"><div class="ttname"><a href="a02457.html#abfb371817eb1c8f0d8a165bb2b798092">_LARGE_UNICODE_STRING::Length</a></div><div class="ttdeci">ULONG Length</div><div class="ttdef"><b>Definition:</b> <a href="a00365_source.html#l00281">user.h:281</a></div></div>
<div class="ttc" id="aa00365_html_a97cf597a555ebc0a9906a10df3382f33"><div class="ttname"><a href="a00365.html#a97cf597a555ebc0a9906a10df3382f33">_MNCanClose</a></div><div class="ttdeci">BOOL _MNCanClose(PWND pwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03599_source.html#l00078">rtl/menu.c:78</a></div></div>
<div class="ttc" id="aa00362_html_a5c87a5fe2e6627e05f4b273b8610fdfa"><div class="ttname"><a href="a00362.html#a5c87a5fe2e6627e05f4b273b8610fdfa">NtUserRemoveMenu</a></div><div class="ttdeci">BOOL NtUserRemoveMenu(IN HMENU hmenu, IN UINT nPosition, IN UINT dwFlags)</div><div class="ttdef"><b>Definition:</b> <a href="a03614_source.html#l04404">kernel/ntstubs.c:4404</a></div></div>
<div class="ttc" id="aa03608_html_afd1a0e78d1f88954d93e48ab3821781f"><div class="ttname"><a href="a03608.html#afd1a0e78d1f88954d93e48ab3821781f">UINT</a></div><div class="ttdeci">typedef UINT(FAR WINAPI *MSGSOUNDPROC)()</div></div>
<div class="ttc" id="aa03743_html_a198bfb6a02f377add1b153df79b8a22d"><div class="ttname"><a href="a03743.html#a198bfb6a02f377add1b153df79b8a22d">GetMenuItemCount</a></div><div class="ttdeci">int GetMenuItemCount(HMENU hMenu)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00357">client/wow.c:357</a></div></div>
<div class="ttc" id="aa00899_html_a70b09c3e2b495630f4205d34be505afb"><div class="ttname"><a href="a00899.html#a70b09c3e2b495630f4205d34be505afb">CheckLock</a></div><div class="ttdeci">VOID CheckLock(PVOID pobj)</div></div>
<div class="ttc" id="aa00197_html_afc61df735e5335ec687432fc26b774a2"><div class="ttname"><a href="a00197.html#afc61df735e5335ec687432fc26b774a2">MakeMenuItem</a></div><div class="ttdeci">int MakeMenuItem(LPWSTR lpOut, PWND pwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00045">mdimenu.c:45</a></div></div>
<div class="ttc" id="aa00098_html_aa5a68d879547f0460331c71bee94763a"><div class="ttname"><a href="a00098.html#aa5a68d879547f0460331c71bee94763a">EndDialog</a></div><div class="ttdeci">BOOL EndDialog(HWND hwnd, int result)</div><div class="ttdef"><b>Definition:</b> <a href="a00098_source.html#l00022">dlgend.c:22</a></div></div>
<div class="ttc" id="aa03743_html_ac9cce9d0a590697fbfd45e1d983b1454"><div class="ttname"><a href="a03743.html#ac9cce9d0a590697fbfd45e1d983b1454">GetMenu</a></div><div class="ttdeci">HMENU GetMenu(HWND hwnd)</div><div class="ttdef"><b>Definition:</b> <a href="a03743_source.html#l00324">client/wow.c:324</a></div></div>
<div class="ttc" id="aa00197_html_a396b1abec3545635b9e505035019a509"><div class="ttname"><a href="a00197.html#a396b1abec3545635b9e505035019a509">SwitchWindowsMenus</a></div><div class="ttdeci">BOOL SwitchWindowsMenus(HMENU hmenu, HMENU hOldWindow, HMENU hNewWindow)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00451">mdimenu.c:451</a></div></div>
<div class="ttc" id="aa00197_html_aa300b1c82b580cb6f7134d6e719da13d"><div class="ttname"><a href="a00197.html#aa300b1c82b580cb6f7134d6e719da13d">MDIRemoveSysMenu</a></div><div class="ttdeci">BOOL MDIRemoveSysMenu(HMENU hMenuFrame, HWND hwndChild, BOOL fRedraw)</div><div class="ttdef"><b>Definition:</b> <a href="a00197_source.html#l00314">mdimenu.c:314</a></div></div>
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_885cc87fac2d91e269af0a5a959fa5f6.html">E:</a></li><li class="navelem"><a class="el" href="dir_4e091ed8704426a7a4980368ba259fde.html">git</a></li><li class="navelem"><a class="el" href="dir_cd70cb5eb491250157f2d55d3ff4b13e.html">backup</a></li><li class="navelem"><a class="el" href="dir_ba2b673b566ba104b956abdc6dec0552.html">org</a></li><li class="navelem"><a class="el" href="dir_5bb0003d7907b45051943541418399f5.html">ntuser</a></li><li class="navelem"><a class="el" href="dir_caf01b281dbc7d7ffe410ecf117b6142.html">client</a></li><li class="navelem"><a class="el" href="a00197.html">mdimenu.c</a></li>
    <li class="footer">制作者
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.17 </li>
  </ul>
</div>
</body>
</html>
